package com.taotao.manager.service;

import com.taotao.manage.mapper.ItemCatMapper;
import com.taotao.manage.pojo.ItemCat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/9/14.
 */
@Service
public class ItemCatService {
    @Autowired
    private ItemCatMapper itemCatMapper;

    /**
     * 根据父节点id查询类目列表
     *
     * @param parentId
     * @return
     */
    public List<ItemCat> queryItemCatListByParentId(Long parentId) {
        ItemCat itemCat = new ItemCat();
        itemCat.setParentId(parentId);
        return this.itemCatMapper.select(itemCat);
    }
}
